/**
 * @file user
 * @author: vscode
 * @Date: 2018-10-23 22:37:16
 * @Last Modified by: v_xieyejiang
 * @Last Modified time: 2018-12-10 14:56:55
 */

'use strict';

const setRes = require('../utils/setRes');

class User {

    static userInfo(req, res) {
        let user = {
            userName: 'public',
            authority: 1
        };
        if (req.session && req.session.views) {
            user.userName = req.session.views.userName;
        }
        setRes(res, 200, user);
    }
}

module.exports = User;
